package com.fisherman.condition;

import org.springframework.context.annotation.ImportSelector;
import org.springframework.core.type.AnnotationMetadata;

/**
 * @User: fisherman
 * @Date: 2020/5/20 8:57
 */

//自定义需要导入的组件
public class MyImportSelector  implements ImportSelector {

    //返回值，就是到导入到容器的组件全类名
    //AnnotationMetadata:当前标注@Import注解的类的所有注解信息
    public String[] selectImports(AnnotationMetadata importingClassMetadata) {

        return new String[]{"com.fisherman.bean.Blue","com.fisherman.bean.Yellow"};
    }
}
